﻿Public Class pruebaMapa2
    Private Sub frmMapaDePrueba_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        If e.KeyCode = Keys.A Then MiSuperHeroe.objeto.Moverme(clControlBasico.Donde.Izquierda, MiMapa)
        If e.KeyCode = Keys.S Then MiSuperHeroe.objeto.Moverme(clControlBasico.Donde.Abajo, MiMapa)
        If e.KeyCode = Keys.D Then MiSuperHeroe.objeto.Moverme(clControlBasico.Donde.Derecha, MiMapa)
        If e.KeyCode = Keys.W Then MiSuperHeroe.objeto.Moverme(clControlBasico.Donde.Arriba, MiMapa)

    End Sub
    Private Sub pruebaMapa2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        MiMapa.AñadirCasilla(New clcasillaAgua(New PictureBox), 5, 7)
        MiMapa.AñadirCasilla(New clcasillaAgua(New PictureBox), 5, 8)
        MiMapa.AñadirCasilla(New clcasillaAgua(New PictureBox), 6, 8)
        MiMapa.AñadirCasilla(New clcasillaAgua(New PictureBox), 7, 7)
        MiSuperHeroe.objeto = control
        MiSuperHeroe.objeto.AñadirControl(Button1)
        MiMapa.AgregarMapa(Me)

        MiSuperHeroe.objeto.Teletransportar(6, 1, MiMapa)



    End Sub
End Class